package com.neutech.test;

import com.neutech.dao.UserDAO;
import com.neutech.dao.impl.UserDAOimpl;
import com.neutech.entity.User;

import java.util.List;

public class UserDAOtest {
    public static void main(String[] args) {
        UserDAO dao = new UserDAOimpl();
//       List<User> users =  dao.selectAll();
//    for (User user:users){
//        System.out.println(user);
//    }
        //      System.out.println(dao.selectById(4));
      //  dao.insert(new User("qiqi", "123456", "1111111", "dongliqu"));
        //修改
       User user = dao.selectById(3);
       user.setPhone("18435680000");
       dao.update(user);
        List<User> users = dao.selectAll();
        for (User u : users) {
            System.out.println(u);
        }

    }
}
